package com.demo.hystrix.client;

import entity.Result;
import entity.StatusCode;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * Author by admin, Email xx@xx.com, Date on 2020/6/2.
 * PS: Not easy to write code, please indicate.
 */
//降级操作
//@Component
//public class SearchServiceFallbackFacyory implements FallbackFactory {
//    @Override
//    public Object create(Throwable throwable) {
//        return (SearchApiService) () ->
//                new Result(true, StatusCode.ERROR,"发生降级");
//    }
//}
